
package practical;

import java.awt.Point;

/**
 * 引數以 by value 方式而非 by reference 方式傳遞<br>
 * <br>
 * Copyright: Copyright (c) 2001-2007<br>
 * Company: 一零四資訊科技股份有限公司
 * 
 * @author Eric.Kao(eric.kao@104.com.tw)
 * @version 1.0
 */
public class Practical001
{
	public Practical001()
	{
		Point point = new Point( 1, 11 );
		int i = 5;

		System.out.println( "Before:" + point + ", " + i );

		modifyPoint( point, i );

		System.out.println( "After:" + point + ", " + i );
	}

	public static void main( String[] args )
	{
		new Practical001();
	}

	private void modifyPoint( Point p, int j )
	{
		p.x = 2;
		p.y = 3;

		j = 10;

		System.out.println( "During:" + p + ", " + j );
	}
}
